Skip to content

Conversation

@Grufoony
Copy link
Collaborator

@Grufoony Grufoony commented Mar 17, 2025

@Grufoony Grufoony changed the title Multi thread evolve Parallelize evolve function Mar 17, 2025
@codecov
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 87.36842% with 12 lines in your changes missing coverage. Please review.

Project coverage is 91.39%. Comparing base (f2b73de) to head (6ed3674).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/dsm/headers/RoadDynamics.hpp 86.90% 11 Missing ⚠️
src/dsm/sources/RoadNetwork.cpp 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
- Coverage   91.51%   91.39%   -0.12%     
==========================================
  Files          38       38              
  Lines        5223     5244      +21     
  Branches      455      459       +4     
==========================================
+ Hits         4780     4793      +13     
- Misses        443      451       +8     
Flag Coverage Δ
unittests 91.39% <87.36%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

std::unordered_map<Id, std::array<long, 4>> m_turnMapping;
std::unordered_map<Id, double> m_streetTails;
std::vector<std::pair<double, double>> m_travelDTs;
tbb::concurrent_vector<std::pair<double, double>> m_travelDTs;

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
const TContainer& src_weights,
const TContainer& dst_weights,
const size_t minNodeDistance = 0);
const std::variant<std::monostate, size_t, double>

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
sum = 0.;
for (const auto& [id, weight] : dst_weights) {
// if the node is at a minimum distance from the destination, skip it
if (this->itineraries().at(id)->path()->getRow(srcId).empty()) {

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
Logger::debug(
std::format("Skipping node {} because the distance from the source "
"is less than {}",
id,

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
}
}

template <typename delay_t>

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 14.4 rule Note

MISRA 14.4 rule
if (nLanes == 1) {
pStreet->enqueue(0);
continue;
}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.1 rule Note

MISRA 12.1 rule
if (!pStreet->isSpire()) {
continue;
}
auto& spire = dynamic_cast<SpireStreet&>(*pStreet);

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
continue;
}
auto& spire = dynamic_cast<SpireStreet&>(*pStreet);
file << separator << spire.code();

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 13.1 rule Note

MISRA 13.1 rule
}
m_travelDTs.clear();
file.close();
}

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 12.3 rule Note

MISRA 12.3 rule
0.0, // Initial value (double)
std::plus<double>(), // Reduction function (addition)
[](const TrafficLightCycle& cycle) -> double {
return static_cast<double>(cycle.greenTime());

Check notice

Code scanning / Cppcheck (reported by Codacy)

MISRA 15.5 rule Note

MISRA 15.5 rule
@Grufoony Grufoony merged commit 8698c8b into main Mar 17, 2025
29 of 31 checks passed
@Grufoony Grufoony deleted the multiThreadEvolve branch March 17, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-threaded version of evolve function

2 participants